<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>SSL</title>
    <!-- 基础样式库 -->
    <link rel="stylesheet" type="text/css" href="{{cdn}}/static/v5/css/materialdesignicons.min.css">
    <link rel="stylesheet" type="text/css" href="{{cdn}}/static/v5/css/bootstrap.min.css">
    <link rel="stylesheet" type="text/css" href="{{cdn}}/static/v5/css/animate.min.css">
    <link rel="stylesheet" type="text/css" href="{{cdn}}/static/v5/css/style.min.css">
    <!-- 功能插件样式 -->
    <link rel="stylesheet" href="{{cdn}}/static/v5/js/bootstrap-table/bootstrap-table.min.css">
    <link rel="stylesheet" type="text/css" href="{{cdn}}/static/v5/js/jquery-confirm/jquery-confirm.min.css">

</head>
<body>
<div class="row">
    <div class="col-md-12">
        <div class="card"></div>
        <div class="card">
            <div class="card-header">

                <header class="card-title">
                    <div id="ssl">

                    </div>

                </header>
            </div>

            <div class="card-body">
                <div id="ssl_loading">
                    正在获取中
                </div>
            </div>
        </div>
    </div>
</div>
<div class="row">
    <div class="col-md-12">
        <div class="card">
            <div class="card-header">
                <div class="form-check form-switch " id="kg" style=" float: right; margin-left: 10px">

                </div>
                <header class="card-title ">
                    证书配置
                </header>
            </div>

            <span class="slider round"></span>
            </label>
            <div class="card-body" id="sslSet_loading">

                <div class="row" id="row">
                    <div class="col-lg-6 col-md-6">
                        <label for="key">密钥(KEY)：</label>
                        <textarea name="key" id="key"  class="form-control"
                                  rows="10"></textarea>
                    </div>
                    <div class="col-lg-6 col-md-6">
                        <label for="csr">证书(PEM格式)：</label>
                        <textarea name="csr" id="csr"  class="form-control"rows="10">
                </textarea></div>
                </div>
                <br>


                <div class="form-group" id="button"></div>

                <div class="form-group">
                    <hr>
                    <small class="text-muted">
                        <li>粘贴您的*.key以及*.pem内容，然后保存即可[<a href="https://www.bt.cn/bbs/thread-704-1-1.html"
                                                                       target="_blank">帮助</a>]。
                        </li>
                        <li>如果浏览器提示证书链不完整,请检查是否正确拼接PEM证书</li>
                        <li>PEM格式证书 = 域名证书.crt + 根证书(root_bundle).crt</li>
                        <li>在未指定SSL默认主机时,未开启SSL的主机使用HTTPS会直接访问到已开启SSL的主机</li>
                        <li>如开启后无法使用HTTPS访问，请检查安全组是否正确放行443端口</li>
                    </small>
                    </hr>
                </div>
            </div>


            <div class="modal fade" id="staticBackdropLive" data-bs-backdrop="static" data-bs-keyboard="false"
                 tabindex="-1" aria-labelledby="staticBackdropLiveLabel" aria-hidden="true">
                <div class="modal-dialog">
                    <div class="modal-content">
                        <div class="modal-header">
                            <h6 class="modal-title" id="staticBackdropLiveLabel">申请SSL证书</h6>
                            <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
                        </div>
                        <div class="modal-body">
                            <div class="mb-3">
                                <label class="form-label">选择域名</label>
                                <select class="form-select" id="path">
                                        <option value=""></option>                               
                                </select>

                            </div>
                            <button type="button" class="btn btn-primary"
                                    style="display: inline-block;text-align: center;" onclick="apply_cert_api()">开始申请
                            </button>
                            <li><span style="color:red">注意：请勿将SSL证书用于非法网站</span></li>
                            <li>Let's Encrypt 证书申请和续签限制 <a class="btlink" target="_blank"
                                                                    href="https://letsencrypt.org/zh-cn/docs/rate-limits/">点击查看</a>
                            </li>
                            <li><span
                                    style="color:red;">Let's Encrypt因更换根证书，部分老旧设备访问时可能提示不可信</span>
                            </li>
                            <li>申请之前，请确保域名已解析，如未解析会导致审核失败</li>
                            <li>Let's Encrypt免费证书，有效期3个月，支持多域名。默认会自动续签</li>
                            <li>若您的站点使用了CDN或301重定向会导致续签失败</li>
                            <li>在未指定SSL默认站点时,未开启SSL的站点使用HTTPS会直接访问到已开启SSL的站点</li>
                            <li>如开启后无法使用HTTPS访问，请检查安全组是否正确放行443端口</li>

                        </div>

                    </div>
                </div>
            </div>
</body>

</html>
<!-- 基础库 -->
<script type="text/javascript" src="{{cdn}}/static/v5/js/jquery.min.js"></script>
<script type="text/javascript" src="{{cdn}}/static/v5/js/popper.min.js"></script>
<script type="text/javascript" src="{{cdn}}/static/v5/js/bootstrap.min.js"></script>
<!-- 功能插件 -->
<script type="text/javascript" src="{{cdn}}/static/v5/js/bootstrap-notify.min.js"></script>
<script type="text/javascript" src="{{cdn}}/static/v5/js/jquery-confirm/jquery-confirm.min.js"></script>
<script type="text/javascript" src="{{cdn}}/static/v5/example/js/layer/layer.js"></script>
<script type="text/javascript" src="{{cdn}}/static/v5/js/lyear-loading.js"></script>
<!-- 页面特定脚本 -->
<script type="text/javascript" src="{{cdn}}/static/js/ssl.js"></script>